package cn.com.jinhao.provider.user.mapper;


import cn.com.jinhao.hotline.commons.base.BaseMapper;
import cn.com.jinhao.hotline.commons.vo.business.LinkManInDeptResponseVO;
import cn.com.jinhao.provider.user.entity.AddressBook;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * HotLine
 * <p>Description: 通讯录</p>
 *
 * @author ShaneMew
 * @version 1.0
 * @date 2020/02/21
 * @since 2020-02-21
 */
@Repository
public interface AddressBookMapper extends BaseMapper<AddressBook> {
    /**
     * 通过部门查新该部门下的联系人信息
     *
     * @param deptCode 部门编码
     * @return {@link LinkManInDeptResponseVO}
     */
    @Select("SELECT tlbk as linkManInfo, code FROM ST$TLBK WHERE ST$DEPT_CODE=#{deptCode}")
    List<LinkManInDeptResponseVO> queryLinkManByDept(@Param("deptCode") String deptCode);
}